﻿@model IEnumerable<Wypozyczalnia.Models.SprzetDB>

@{
    Layout = null;
}
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    
    @Styles.Render("~/Content/css")
    <style>/* shopping cart --------------  */
 #main
        {
            background: #0099cc;
            margin-top: 0;
            padding: 2px 0 4px 0;
            text-align: center;
        }
        #main a
        {
            color: #ffffff;
            text-decoration: none;
            font-size: 12px;
            font-weight: bold;
            font-family: Arial;
        }
        #main a:hover
        {
            text-decoration: underline;
        }
#item_container
        {
            width: 610px;
            margin: 0 auto;
            margin-top: 10px;
            margin-bottom: 10px;
        }
        .item
        {
            background: #fff;
            float: left;
            padding: 5px;
            margin: 5px;
            cursor: move;
            -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.5);
            -moz-box-shadow: 0 1px 2px rgba(0,0,0,.5);
            box-shadow: 0 1px 2px rgba(0,0,0,.5);
            -webkit-border-radius: .5em;
            -moz-border-radius: .5em;
            border-radius: .5em;
            z-index: 5;
        }
        .title, .price
        {
            display: block;
            text-align: center;
            font-size: 14px;
            letter-spacing: -1px;
            font-weight: bold;
            cursor: move;
        }
        .title
        {
            color: #333;
        }
        .price
        {
            color: #0099cc;
            margin-top: 5px;
            -webkit-border-radius: .5em;
            -moz-border-radius: .5em;
            border-radius: .5em;
        }
        .icart, .icart label
        {
            cursor: e-resize;
        }
        .divrm
        {
            text-align: right;
        }
        .remove
        {
            text-decoration: none;
            cursor: pointer;
            font-weight: bold;
            font-size: 20px;
            position: relative;
            top: -7px;
        }
        .remove:hover
        {
            color: #999;
        }
        .clear
        {
            clear: both;
        }
        #cart_container
        {
            margin: 0 auto;
            width: 495px;
        }
        #cart_title span
        {
            border: 8px solid #666;
            border-bottom-width: 0;
            background: #333;
            display: block;
            float: left;
            color: #fff;
            font-size: 11px;
            font-weight: bold;
            padding: 5px 10px;
            -webkit-border-radius: .5em .5em 0 0;
            -moz-border-radius: .5em .5em 0 0;
            border-radius: .5em .5em 0 0;
        }
        #cart_toolbar
        {
            overflow: hidden;
            border: 8px solid #666;
            height: 190px;
            z-index: -2;
            width: 483px;
            -webkit-border-radius: 0 .5em 0 0;
            -moz-border-radius: 0 .5em 0 0;
            border-radius: 0 .5em 0 0;
            background: #ffffff;
        }
        #cart_items
        {
            height: 190px;
            width: 10000px;
            position: relative;
            padding: 0 0 0 2px;
            z-index: 0;
            cursor: e-resize;
            border-width: 0 2px;
        }
        .back
        {
            background: #e9e9e9;
        }
        #navigate
        {
            width: 463px;
            margin: 0 auto;
            border: 8px solid #666;
            border-top-width: 0;
            -webkit-border-radius: 0 0 .5em .5em;
            -moz-border-radius: 0 0 .5em .5em;
            border-radius: 0 0 .5em .5em;
            padding: 10px;
            font-size: 14px;
            background: #333;
            font-weight: bold;
        }
        #nav_left
        {
            float: left;
        }
        #nav_left a
        {
            padding: 4px 8px;
            background: #fff;
            -webkit-border-radius: .5em;
            -moz-border-radius: .5em;
            border-radius: .5em;
            text-decoration: none;
            color: #0099cc;
        }
        #nav_left a:hover
        {
            background: #666;
            color: #fff;
        }
        #nav_right
        {
            float: right;
        }
        .sptext
        {
            background: #333;
            display: inline-block;
            margin-top:5px;
            color: #666;
            position:relative;
        }
            .sptext label
            {
                display:block;
            }
        .count
        {
            color: #0099cc;
        }
        .drop-active
        {
            background: #ffff99;
        }
        .drop-hover
        {
            background: #ffff66;
        }

      
     
    </style>
     
    <script type="text/javascript" src="~/Scripts/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery-ui-1.8.20.min.js"> </script>
    <script type="text/javascript" src="~/Scripts/moje_skrypty/shopping_cart.js"> </script>
</head>

 <body>    
   

    <header>
            <div class="content-wrapper">
                <div class="float-left">
                    <p class="site-title">@Html.ActionLink("your logo here", "Index", "Home")</p>
                </div>
                <div class="float-right">
                    <section id="login">
                        @Html.Partial("_LoginPartial")
                    </section>
                    <nav>
                        <ul id="menu">
                            <li>@Html.ActionLink("Home", "Index", "Home")</li>
                            
                            <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                            @if(User.IsInRole("admin")){<li>@Html.ActionLink("Sprzet", "Index", "Wypozyczalnia")</li>}
                            @if(User.IsInRole("user")){<li>@Html.ActionLink("Zakupy", "Index", "Product")</li>}
                            @if(User.IsInRole("seller")){<li>@Html.ActionLink("Zamowienia", "Index", "Zamowienia")</li>}
                            @if(User.IsInRole("user")){<li>@Html.ActionLink("Zrealizowane", "Zrealizowane", "Product")</li>}
                        </ul>
                    </nav>
                </div>
            </div>
        </header>
    
    
 
      
     <div id="body">
         <div id="amount">
             <input
         </div>
         <div class="title">Wypożycz sprzęt(cena za jeden dzień) przeciągając go na kartę zakupów </div>
    <div id="item_container">
     @foreach (var item in Model)
           {
               if (item.dostepnosc&&item.ilosc>0)
               {
          <div id="@Html.DisplayFor(modelItem => item.ID)" class="item">
              <img src="@Url.Content(item.zdjecie_url)"/>
              <label class="title">@Html.DisplayFor(modelItem => item.nazwa)</label>
              <label class="price">$ @Html.DisplayFor(modelItem => item.cena)</label>
              <label class="title"  for="@Html.DisplayFor(modelItem => item.ID)">@Html.DisplayFor(modelItem => item.ilosc)</label>
          </div>
                 }
          } 
          <div class="clear"> </div>
      </div>
         @using (Html.BeginForm("Index", "Product", FormMethod.Post))
               {
    <div id="cart_container">
          <div id="cart_title">
              <span>Shopping Cart </span>
              <div class="clear"></div>
          </div>
          <div id="cart_toolbar">
               
                   
              <div class="back" id="cart_items"></div>
                
                       
          </div>
          <div id="navigate">
              <div id="nav_left">
                  <a id="btn_prev"><</a>
                  <a id="btn_next">></a>
                  <a id="btn_clear">Clear Cart</a>
              </div>
              <div id="nav_right">
                      
                
                     <span class="sptext">
                      <label>rzeczy </label><input  id="citem" name="citem" class="count" value="0" readonly="readonly" />
                     </span>
                  
                      <span class="sptext">
                          <label>cena </label><input id="cprice"  name="cprice" class="count" value="0" readonly="readonly" /><label style="display:inline-block">$</label>
                      </span>
                    <div> <input type="submit" name="items-submit" value="Wypożycz" /></div>
                    
                      
                    
                  
              </div>
              <div class="clear"></div>
          </div>
      </div>
               } 
         </div>
                       
    

     <footer>
            <div class="content-wrapper">
                <div class="float-left">
                    <p>&copy; @DateTime.Now.Year - My ASP.NET MVC Application</p>
                </div>
            </div>
        </footer>
</body>
</html>


